package gof.observe;

import java.util.Observable;

/**
 * TODO
 * 2020-11-04 16:12
 */
public class Displaynew implements Observer,DisplayElement{
    Integer Temprature;
    Integer Humidity;
    Integer Pressure;
    Observable observable;

    public Displaynew(Observable observable){
        this.observable = observable;
    }

    @Override
    public void update(Integer Temprature, Integer Humidity, Integer Pressure) {
        this.Temprature = Temprature;
        this.Humidity = Humidity;
        this.Pressure = Pressure;
        display();
    }

    @Override
    public void display() {
        System.out.println("display 02 :" + this.Temprature + this.Humidity + this.Pressure);
    }

    public static void main(String[] args) {

    }
}
